import request from '@/utils/request'

export const getProperties = (params) => request({
  url: '/properties',
  method: 'GET',
  params
})

export const getPropertyDetailByID = (id) => request({
  url: `/properties/${id}`,
  method: 'GET'
})

export const addProperty = (data) => request({
  url: '/properties',
  method: 'POST',
  data
})

export const editProperty = (data) => request({
  url: `/properties/${data.id}`,
  method: 'PUT',
  data
})

export const deleteProperty = (id) => request({
  url: `/properties/${id}`,
  method: 'DELETE'
})
